/*
 *
 * Copyright (C) 2012 Walter Lütgenau
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package offset.nodes.server.servlet.book.provider;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Locale;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Walter L�tgenau
 */
public class NonCommittingServletResponse implements HttpServletResponse {
    HttpServletResponse response;

    public NonCommittingServletResponse(HttpServletResponse response) {
        this.response = response;
    }

    public void setLocale(Locale loc) {
    }

    public void setContentType(String type) {
    }

    public void setContentLength(int len) {
    }

    public void setCharacterEncoding(String charset) {
    }

    public void setBufferSize(int size) {
    }

    public void resetBuffer() {
    }

    public void reset() {
    }

    public boolean isCommitted() {
        return false;
    }

    public PrintWriter getWriter() throws IOException {
        return response.getWriter();
    }

    public ServletOutputStream getOutputStream() throws IOException {
        return response.getOutputStream();
    }

    public Locale getLocale() {
        return response.getLocale();
    }

    public String getContentType() {
        return response.getContentType();
    }

    public String getCharacterEncoding() {
        return response.getCharacterEncoding();
    }

    public int getBufferSize() {
        return response.getBufferSize();
    }

    public void flushBuffer() throws IOException {
    }

    public void setStatus(int sc, String sm) {
    }

    public void setStatus(int sc) {
    }

    public void setIntHeader(String name, int value) {
    }

    public void setHeader(String name, String value) {
    }

    public void setDateHeader(String name, long date) {
    }

    public void sendRedirect(String location) throws IOException {
    }

    public void sendError(int sc) throws IOException {
    }

    public void sendError(int sc, String msg) throws IOException {
    }

    public String encodeUrl(String url) {
        return response.encodeUrl(url);
    }

    public String encodeURL(String url) {
        return response.encodeURL(url);
    }

    public String encodeRedirectUrl(String url) {
        return response.encodeRedirectUrl(url);
    }

    public String encodeRedirectURL(String url) {
        return response.encodeRedirectURL(url);
    }

    public boolean containsHeader(String name) {
        return response.containsHeader(name);
    }

    public void addIntHeader(String name, int value) {
    }

    public void addHeader(String name, String value) {;
    }

    public void addDateHeader(String name, long date) {
    }

    public void addCookie(Cookie cookie) {
    }
}
